package com.bit.cfdi.web.dao;

import java.util.ArrayList;
import java.util.Calendar;
import java.util.List;

import org.springframework.dao.DataAccessException;

import com.bit.cfdi.web.domain.Concepto;
import com.bit.cfdi.web.domain.ConceptoParte;
import com.bit.cfdi.web.domain.Negocio;

public interface ConceptoDAO {

	public void save(final Concepto concepto) throws DataAccessException;
	
	public void delete(final Concepto concepto) throws DataAccessException;

	public Concepto getById(final Long id) throws DataAccessException;

	public List<Concepto> getAll() throws DataAccessException;

	public Concepto getByName(final String name) throws DataAccessException;
	
	public List<Concepto> getAllfromNegocio(final Negocio negocio) throws DataAccessException;
	
	public List<Object[]> getBestClientsInTime(final Concepto concepto, 
			final Calendar initDate, final Calendar finalDate) throws DataAccessException;
	
	public List<ConceptoParte> getAllPartConceptos(final Concepto concepto) throws DataAccessException;
	
	public List<Concepto> searchConceptByAllFields(final Negocio neg, 
			final String toSearch) throws DataAccessException;
	
	public List<Concepto> searchByDescUnit(final Negocio neg, 
			final String description, final String unit) throws DataAccessException;
	
	public List<Object[]> getTotalSalesInTime( Concepto concept, 
			Calendar initDate, Calendar finalDate) throws DataAccessException;
	
	public List<Object[]> getTotalSalesInTimeByCategory(final String category, 
			final Concepto concept, final Calendar initDate, final Calendar finalDate) throws DataAccessException;
	
	public ArrayList<Object> getListaConceptos(final String descripcionLike, 
			final Negocio negocio) throws DataAccessException;
	
	public List<Concepto> getByDescr(final Negocio negocio, 
			final String descr) throws DataAccessException;
	
	public Concepto getByNameNegocio(final String name, 
			final Negocio negocio) throws DataAccessException;
}
